package gui;

import java.io.IOException;
import javax.swing.JOptionPane;
import com.google.gdata.util.ServiceException;

import database.Database;
import utility.DisplayUpdateException;

public final class ChartsWindow extends StcalWindow{

	private static final long serialVersionUID = 1L;
//	private final static String COM_FAILURE = "Unable to sync data with Google records. Available data will be projected.";
	private final static String RAISED_EXEP = "Exception was raised";
	
	private ChartsWindow(){}
	
	private static void launch(){
		new	ChartsView();
		Database.addMaintenanceCost(STARTUP_TIME);
	}
	
	public static void main(String[] args) throws IOException, ServiceException{
		try{
			launch();
		}
		catch(DisplayUpdateException d){
			displayResults(d.getMessage());
			launch();
		}
		catch (RuntimeException r){
			JOptionPane.showMessageDialog(new JOptionPane(), RAISED_EXEP);
			r.printStackTrace();
			launch();
		}
	}
}